.nil?
nil.nil? #true
[].nil? #false
{}.nil? #false
"".nil? #false
" ".nil? #false
"abc".nil? #false
123.nil? #false
.empty? & .any?
nil.empty? #NoMethodError: undefined method `empty?' for nil:NilClass
[].empty? #true
{}.empty? #true
"".empty? #true
" ".empty? #false
"abc".empty? #false
123.empty? #NoMethodError: undefined method `empty?' for 123:Fixnum
nil.any? #NoMethodError: undefined method `any?' for nil:NilClass
[].any? #false
{}.any? #false
"".any? #NoMethodError: undefined method `any?' for "":String
" ".any? #NoMethodError: undefined method `any?' for "":String
"abc".any? #NoMethodError: undefined method `any?' for "":String
123.any? #NoMethodError: undefined method `any?' for 123:Fixnum
.blank? & .present?
nil.blank? #true
[].blank? #true
{}.blank? #true
"".blank? #true
" ".blank? #true
"abc".blank? #false
123.blank? #false
nil.present? #false
[].present? #false
{}.present? #false
"".present? #false
" ".present? #false
"abc".present? #true
123.present? #true